{
  "name": "beVault AI Assistant - MCP Integration",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "id": "2cb06df2-4698-474a-8514-c45348daf119",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        448,
        304
      ],
      "webhookId": "60949669-dae7-4382-89b5-e6a6e6bf678f"
    },
    {
      "parameters": {
        "content": "## beVault AI Assistant via MCP\n\n**What It Does**\nAI assistant powered by Claude that helps you interact with your beVault data platform through the Model Context Protocol (MCP). It can:\n\n📊 **Build Module**\n- Search and manage data models (Hubs, Links, Satellites, Reference Tables)\n- Create, update, and delete Data Vault entities\n\n🔌 **Source Module**\n- Manage source systems and data packages\n- Create and configure staging tables\n- Map columns to Data Vault entities\n\n📈 **Distribute Module**\n- Search and manage information marts\n- Create and update information mart scripts\n- Query script metadata and structure\n\n**Setup Requirements**\n\n1. **LLM Provider Credentials**: Configure your AI model (Claude, OpenAI, etc.)\n\n2. **beVault MCP Server**: Deploy and run the beVault MCP server\n   - Docker: `docker run -p 8000:8000 -e BEVAULT_BASE_URL=https://your-bevault-url.com quay.io/dfakto_org/bevault_mcp`\n\n3. **MCP Tool Configuration**: \n   - **Endpoint**: `http://localhost:8000/mcp` (local) or `http://host.docker.internal:8000/mcp` (Docker)\n   - **Authentication**: Header Auth with `Authorization: ApiToken [your-bevault-api-key]`\n   - **Transport**: HTTP Streamable\n\n4. **beVault API Key**: Create an API key in beVault Admin → API Keys with appropriate project permissions\n\n**Getting Started**\nTry asking:\n- \"List all hubs in my project\"\n- \"Show me available information marts\"\n- \"What source systems do we have?\"",
        "height": 560,
        "width": 678
      },
      "id": "48847809-31c9-44d8-9ccb-6d4aa145c9c1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -320,
        160
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are an AI assistant specialized in helping users work with beVault, a modern data platform based on Data Vault methodology.\n\n**Your Capabilities**\n\nYou have access to beVault through MCP tools that allow you to:\n\n**Build Module:**\n- Search and manage data models (Hubs, Links, Satellites, Reference Tables)\n- Create, update, and delete Data Vault entities\n- Retrieve detailed information about specific entities\n\n**Source Module:**\n- Search and manage source systems and their data packages\n- Create and configure staging tables\n- Map columns to Data Vault entities (hubs, links, satellites)\n- Manage data package definitions\n\n**Distribute Module:**\n- Search and list information marts\n- Retrieve information mart script definitions\n- Create and update information mart scripts\n- Manage script metadata and column mappings\n\n**beVault Core Concepts**\n\n- **Hubs**: Core business entities (e.g., Customer, Product, Order)\n- **Links**: Relationships between hubs (e.g., Customer-Product relationship)\n- **Satellites**: Descriptive attributes and historical data for hubs or links\n- **Reference Tables**: Lookup/reference data (e.g., country codes, status codes)\n- **Source Systems**: External systems providing data (e.g., CRM, ERP)\n- **Data Packages**: Logical groupings of data within a source system\n- **Staging Tables**: Tables mapping source data to Data Vault entities\n- **Information Marts**: Analytical structures built from the Data Vault model\n\n**Working Guidelines**\n\n1. **Always ask for the project name** before using any beVault tools\n\n2. **Search before creating**: Check if entities already exist to avoid duplication\n\n3. **Naming conventions**: \n   - Use lowercase with underscores (e.g., `customer_order`, not `Customer-Order`)\n   - Satellites typically follow the pattern: `[src_code]_info`\n\n4. **Confirm before actions**: Always confirm with the user before creating, updating, or deleting any entities\n\n5. **Be methodical**: When handling complex requests, break them down into steps:\n   - Understand the requirement\n   - Check existing model\n   - Identify what needs to be created/updated\n   - Execute changes in logical order\n   - Verify results\n\n6. **Provide context**: Explain what you're doing and what the results mean in business terms\n\n7. **Ask clarifying questions**: If a request is unclear, ask for more details before proceeding\n\n**Your Role**\n\nHelp users:\n- Navigate and understand their beVault data models\n- Implement new data sources following Data Vault best practices\n- Extend existing models with new entities and relationships\n- Map source data to Data Vault structures\n- Create and maintain information marts for analytics\n- Troubleshoot data modeling issues\n\nAlways prioritize data model consistency, avoid duplication, and follow Data Vault methodology principles."
        }
      },
      "id": "c35087ce-2a23-4a23-94f0-b323b5ad7cde",
      "name": "Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        672,
        304
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929",
          "cachedResultName": "Claude Sonnet 4.5"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        544,
        512
      ],
      "id": "03134f6f-94c5-47bd-8803-f114cd8f6202",
      "name": "Anthropic Chat Model"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        768,
        512
      ],
      "id": "7c266e97-4a88-4d98-8b33-bb412066e2fa",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "endpointUrl": "http://localhost:8000/mcp",
        "authentication": "headerAuth",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.2,
      "position": [
        928,
        512
      ],
      "id": "3d758176-9894-4fe9-b57e-364158d2dec1",
      "name": "MCP beVault"
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "MCP beVault": {
      "ai_tool": [
        [
          {
            "node": "Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "meta": {
    "instanceId": "54cba4e85c592b7801e7101a28e4523e39dcf5f87f4ab19511dae8d299c62314"
  },
  "tags": []
}